### Project 5 Blow Windmills 1.Project 5 Blow Windmills It is said that a windmill inside the screen can be blown in a magic hut. How can this be achieved? Let’ s practice this "Blow Windmills" project! Task analysis | Sensor | Sound Sensor | | ------ | ------------------------------------------------------------ | | Role | Windmill | | Place | Blue sky | | Result | we can move the windmillby blowing air into the sound sensor | **2.Sound Sensor Introduction** ![](media/image-20251208155556030.png) There is a sound sensor in this project, which is a device used to detect sound and output analog signals. It mainly consists of a microphone, a LM358D chip and an adjustable potentiometer. The sound sensor detects the sound and converts it into voltage signals, then amplifies it via the LM358D chip. The potentiometer is used to adjust the signal magnification. There are 6 ports on the module and those marked in the same name are connected. When using, we solely need to connect any G port to the GND end of the control board, V port to the 3V end and S port to the A0 signal end. We can judge the loudness of the sound in the current environment by reading the analog value of the signal end. Specifications: - Operating voltage: DC 3.3~5V - Output signal:Analog signal - Dimension: 31mm*27mm*4mm - Weight: 2g - Environmental protection attributes: ROHS **3.Components Needed** | Control Board * 1 | USB Cable*1 | Alligator Clip Wire*3 | Sound Sensor *1 | | -------------------------------------- | -------------------------------------- | -------------------------------------- | -------------------------------------- | | ![](media/image-20251208155937057.png) | ![](media/image-20251208155944691.png) | ![](media/image-20251208155950975.png) | ![](media/image-20251208155957064.png) | **4.Connection Diagram** ![](media/image-20251208160030530.png) **5.Test Program** 1.Open“KidsBlock”software to create a new project. 2.Select “Blue Sky 2”:click the background library icon![](media/image-20251208160111926.png)in the lower right corner to select Blue Sky 2. ![](media/image-20251208160135769.png) 3.Delete the beetle role. 4.Paint a windmill ①Select "Brush" and use the line tool![](media/image-20251208160216026.png)to draw the outline of the windmill with the border as![](media/image-20251208160234154.png). ②Select the tool![](media/image-20251208160256627.png)and all lines, click "![](media/image-20251208160314543.png)",then all the lines will be combined together. ③Select the combined pattern and change the filling color to "smalt"![](media/image-20251208160349680.png), put the lower left corner on the center point of the drawing area, as shown in the picture below: ![](media/image-20251208160405359.png) ④Draw other parts of the windmill according to steps ①~③, and the combine them. Name the role "windmill", as shown below: ![](media/image-20251208160418663.png) ⑤Draw sticks Select "Brush" and use the line tool![](media/image-20251208160452226.png)to draw a stick with a border of![](media/image-20251208160500888.png), and name it "Stick". ![](media/image-20251208160515769.png) ⑥Adjust the position of the stick and windmill on the stage. ![](media/image-20251208160532372.png) 5.Build the program ①Select “windmill”and build the program ![](media/image-20251208160755851.png) ![](media/image-20251208160802010.png) ![](media/image-20251208160809950.png) ![](media/image-20251208160816615.png) ![](media/image-20251208160823062.png) ②Save the project and name it“Blow Windmill” **6.Complete Program** ![](media/image-20251208160902775.png) **7.Test Result** Connect the device and select the port, then click![](media/image-20251208160936207.png).When we blow into the sound sensor, the windmill will rotate, and when we don't blow, it will stay still. ![](media/image-20251208160955046.png) **8.Program Explanation** | Instruction | Function | Module | | -------------------------------------- | ------------------------------------------------------------ | ------- | | ![](media/image-20251208161133067.png) | Execute it repeatedly | Control | | ![](media/image-20251208161154144.png) | When the value received by the sound sensor is greater than 50, the program under the statement will be executed, that is, the windmill starts to turn | |